﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;

namespace NetCMS.Model
{
    /// <summary>
    /// SQL查询时所用的条件
    /// </summary>
    [Serializable]
    public class SQLConditionInfo
    {
     
        private string pname;
        private object pvalue;
        private bool _additory;
        //private T x;
        private byte _continuous;
        private bool _blur;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="paramname">参数名称</param>
        /// <param name="paramvalue">参数的值</param>
        public SQLConditionInfo(string paramname, object paramvalue)
        {
            pname = paramname;
            pvalue = paramvalue;
            _additory = false;
            _blur = false;
        }
        /// <summary>
        /// 参数名称
        /// </summary>
        public string name
        {
            get { return pname; }
        }
        /// <summary>
        /// 参数的值
        /// </summary>
        public object value
        {
            get { return pvalue; }
        }
        /// <summary>
        /// 是否将条件附加在SQL语句之后,如果为true,即在原来SQL语句之后加" and [paramname]=@paramname"
        /// </summary>
        public bool additory
        {
            set { _additory = value; }
            get { return _additory; }
        }
        /// <summary>
        /// 是否以模糊查询的方式附加
        /// </summary>
        public bool blur
        {
            set { _blur = value; }
            get { return _blur; }
        }
    }
}
